<?php
header("content-type:text/html;charset=utf-8");

class Car {
	private $carMode;
	private $carBand;
	private $weight;
	private $speed;

	function Car($a,$b,$c,$d){
		$this->carMode = $a;
		$this->carBand = $b;
		$this->weight = $c;
		$this->speed = $d;
	}
	
	function getWeight(){
		return $this->weight;
	}
	function getSpeed(){
		return $this->speed;
	}
	


}

/*
$car1 = new Car();
$car1->carMode = "x6";
$car1->carBand = "宝马";
$car1->weight = "2.0";
$car1->speed = "200";
*/
$car1 = new Car("x6","宝马",2.0,200);
echo "<pre>";
print_r($car1);
echo $car1->getWeight();
echo $car1->getSpeed();



class BMWcar extends Car{

}
	$bmw1 = new Car("M4","宝马",3.0,300);
    echo "<pre>";
	print_r($bmw1);

	